package com.zm.zmgz.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: cjw
 * @Date: 2020/06/09/15:22
 * @Description: 获取配置属性
 */
@Component
public class ConfigureBean {

    private static String serverPort; // 服务器端口

    private static String serverAddress; // 服务器ip

    private static String upFileAddress; // 文件上传地址


    public static String getUpFileAddress() {
        return upFileAddress;
    }

    @Value("${upFileAddress}")
    public  void setUpFileAddress(String upFileAddress) {
        ConfigureBean.upFileAddress = upFileAddress;
    }

    public static String  getServerPort() {
        return serverPort;
    }

    @Value("${server.port}")
    public  void setServerPort(String serverPort) {
        ConfigureBean.serverPort = serverPort;
    }

    public static String getServerAddress() {
        return serverAddress;
    }

    @Value("${server.address}")
    public  void setServerAddress(String serverAddress) {
        ConfigureBean.serverAddress = serverAddress;
    }
}
